import Head from "next/head"; import { useTheme } from "@mui/material/styles"; import Typography from "@mui/material/Typography"; import Box from "@mui/material/Box"; import { getAllDocs } from "../../lib/api"; import { SITE_NAME } from "../../lib/constants"; import { Doc } from "../../types"; import Link from "../../Link"; import { Layout } from "../../components/Layout"; import { GetStaticProps } from "../../lib/getStatic"; type Props = { allDocs: Doc[]; lang: string; }; const Index = ({ allDocs, lang }: Props) => { const theme = useTheme(); return ( صفحات راهنما | {SITE_NAME}
{allDocs.map((doc) => (
{doc.title}
))}
); }; export default Index; export async function getStaticProps({ params }: GetStaticProps) { const allDocs = getAllDocs(["title", "date", "slug", "author", "locale"]); return { props: { lang: params.lang, allDocs }, }; } export { getStaticPaths } from "../../lib/getStatic";